﻿namespace Homework01
{
    internal class Program
    {
        /// <summary>
        /// 用户输入一个分数，根据分数，分别给出A B C D
        /// </summary>
        /// <param name="args"></param>
        static void Main(string[] args)
        {
            //Todo get input from keyboard
            Console.Write("Please input score (0-100):");
            string? userInput = Console.ReadLine();
            //Todo convert the input into integer
            int score;
            string answer;
            if (int.TryParse(userInput, out score))
            {
                //convert success
                //Todo according with the integer,give the answer
                if (score > 90) answer = "A";
                else if (score > 60) answer = "B";
                else answer = "C";
                Console.WriteLine(answer);
            }
            else
            {
                //Todo invalid input
                Console.WriteLine("Your score is invalid");
            }
        }
    }
}
